//package com.mapper;
//
//import com.pojo.Floor;
//import org.apache.ibatis.annotations.*;
//
//import java.util.List;
//
//@Mapper
//public interface FloorMapper {
//    // 新增楼层
//    @Insert("INSERT INTO floor (name, building_id, model_path, create_time) " +
//            "VALUES (#{name}, #{buildingId}, #{modelPath}, #{createTime})")
//    @Options(useGeneratedKeys = true, keyProperty = "id") // 获取自增主键
//    void insert(Floor floor);
//
//    // 根据大楼ID查询楼层列表
//    @Select("SELECT id, name, building_id AS buildingId, model_path AS modelPath " +
//            "FROM floor WHERE building_id = #{buildingId}")
//    List<Floor> selectByBuildingId(Integer buildingId);
//
//    // 根据ID查询楼层详情
//    @Select("SELECT id, name, building_id AS buildingId, model_path AS modelPath " +
//            "FROM floor WHERE id = #{id}")
//    Floor selectById(Integer id);
//
//    // 更新楼层信息（动态更新字段）
//    @Update("<script>" +
//            "UPDATE floor " +
//            "<set>" +
//            "   <if test='name != null'>name = #{name},</if>" +
//            "   <if test='modelPath != null'>model_path = #{modelPath},</if>" +
//            "   update_time = NOW()" +
//            "</set>" +
//            "WHERE id = #{id}" +
//            "</script>")
//    void updateById(Floor floor);
//
//    // 根据ID删除楼层
//    @Delete("DELETE FROM floor WHERE id = #{id}")
//    void deleteById(Integer id);
//}